package com.youlu.campus.web.platform;

import com.youlu.campus.domain.service.PlatformDomainConfigService;
import com.yuelin.infrastructure.quantum.common.QResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 平台配置域名配置
 */
@Slf4j
@RestController
public class PlatformDomainConfigController {
    @Autowired
    private PlatformDomainConfigService platformDomainConfigService;

    @GetMapping("/public/platform/domain-config")
    public QResult getPlatformDomain(@RequestParam(name="domain",required = true) String domain) {
        return QResult.success(platformDomainConfigService.findByDomain(domain));
    }

}
